import React, { Component } from 'react';

import './index.scss';

class ListTitleCon extends Component {


  render () {
    const { title, onRefreshData, refreshHide } = this.props;
    return (
      <div className="list-title">
        <h1 className="title">{ title }</h1>
        <span
          className= { ['refresh-btn', refreshHide ? 'hide' : ''].join(' ')}
          onClick = { () => onRefreshData() }>
          <i className="iconfont iconrefresh"></i>
          刷新数据
        </span>
      </div>
    )
  }
}

export default ListTitleCon;